<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Flanvas - DisplayObject tween</title>

<script src="../flanvas.r25.js" type="text/javascript"></script>
<script src="../caurina/transitions/Tweener.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload = function() {
	_f.traceDiv = document.getElementById("trace");
	//_f.clear_trace_on_frame = false;
	//_f.trace_draw = true;
	stage.canvas = document.getElementById('myCanvas');
	
	var box1 = new Sprite();
	box1.graphics.beginFill(0x009900);
	box1.graphics.drawRect(0, 0, 50, 50);
	box1.graphics.endFill();
	box1.x = 10;
	box1.y = 10;
	stage.addChild(box1);
	
	box1.addEventListener(Event.ENTER_FRAME, function(event) {
		trace(event.target.x);
	});
	
	var func = function() {
		alert('done');
	}
	var t = Tweener.addTween(box1, {'x':200.0, 'time':2.0, 'transition':'easeOutCirc', 'onComplete':func});
	
}
</script>
</head>

<body>

<div id="trace" width="250" height="350" style="position:absolute; right:0; text-align:right;"></div>
<canvas id="myCanvas" width="550" height="400" style="position:absolute; left:0; top:0;"></canvas>

</body>
</html>
